﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace Oroboros.Save_Data
{
    public class HumanManagerSaveData : INotifyPropertyChanged
    {
        private int _FamiliesCollected;
        private bool _FirstDay;
        private ObservableCollection<HumanSaveData> _Humans = new ObservableCollection<HumanSaveData>();
        private int _LastReputationChangeReported = 50;
        private Guid _Player = Guid.Empty;
        private ObservableCollection<Guid> _RaidingParty = new ObservableCollection<Guid>();
        private int _Reputation = 50;
        private int _ZombieKilledReputationCounter;

        public int FamiliesCollected { get { return _FamiliesCollected; } set { Changed("FamiliesCollected"); _FamiliesCollected = value; } }
        public bool FirstDay { get { return _FirstDay; } set { Changed("FirstDay"); _FirstDay = value; } }
        public ObservableCollection<HumanSaveData> Humans { get { return _Humans; } set { Changed("Humans"); _Humans = value; } }
        public int LastReputationChangeReported { get { return _LastReputationChangeReported; } set { Changed("LastReputationChangeReported"); _LastReputationChangeReported = value; } }
        public Guid Player { get { return _Player; } set { Changed("Player"); _Player = value; } }
        public ObservableCollection<Guid> RaidingParty { get { return _RaidingParty; } set { Changed("RaidingParty"); _RaidingParty = value; } }
        public int Reputation { get { return _Reputation; } set { Changed("Reputation"); _Reputation = value; } }
        public int ZombieKilledReputationCounter { get { return _ZombieKilledReputationCounter; } set { Changed("ZombieKilledReputationCounter"); _ZombieKilledReputationCounter = value; } }

        public event PropertyChangedEventHandler PropertyChanged;
        public void Changed(string n)
        {
            if (PropertyChanged == null) return;
            if (!string.IsNullOrEmpty(n))
                PropertyChanged(this, new PropertyChangedEventArgs(n));
        }
    }
}
